package com.ziqikeji.strategy;

/**
 * 按照满减方策略计算价格
 * 促销策略实现类
 */
public class BreakAboveStrategy implements Strategy {

    @Override
    public double calPrice(double price) {
        //满减线
        double aboveLevel = 100;
        //减少金额
        double breakMoney = 10;

        return price >= aboveLevel ? price - breakMoney : price;
    }


}
